package com.tmpt.controller.servlet;

import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.tmpt.dto.ConstantDto;

public class CustomerLogoutServlet extends HttpServlet {

	public void destroy() {
		super.destroy(); 	
	}

	public void doGet(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {
	     this.doPost(request, response);
	}


	public void doPost(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {
		String path = request.getContextPath();
		request.getSession().removeAttribute(ConstantDto.CustomerDtoSession);
		response.sendRedirect(path+"/front/product/index.jsp");
	}
	public void init() throws ServletException {
		
	}

}
